home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94a.txt / 000009_icon-group-sender _Mon Jan 10 14:29:43 1994.msg < prev    next >
Internet Message Format  |  1994-08-19  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 10 Jan 1994 18:57:04 MST
  2. Date: Mon, 10 Jan 94 14:29:43 pst
  3. From: balexander@ccmail.com
  4. Message-Id: <9400107582.AA758240983@smtpgate.ccmail.com>
  5. To: icon-group@cs.arizona.edu,
  6.         walter!flaubert!norman@rutgers.edu  (Norman Ramsey)
  7. Subject: Re: Icon and sockets
  8. Status: R
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11.  
  12. You can't use the "b" open option with pipes, unfortunately.  The "p" 
  13. option is implemented using the (non-ANSI) C library popen() facility, 
  14. which only supports one way at a time.  I suspect that a both-way 
  15. implementation could be done to support "b", but it would be 
  16. non-trivial.
  17.  
  18. I've wished for this before -- wouldn't Icon be wonderful for 
  19. controlling an external process!  I tried to do something using standard 
  20. Icon and PTYs (in UNIX), but was unsuccessful.  If anyone has been able 
  21. to do this, I encourage you to post your solution: it seems that others 
  22. might be interested.
  23.  
  24. -- Bob (balexander@ccmail.com)
  25.  
  26.  
  27. ______________________________ Reply Separator _________________________________
  28. Subject: Icon and sockets
  29. Author:  walter!flaubert!norman@rutgers.edu  (Norman Ramsey) at internet-mail
  30. Date:    1/10/94 11:17 AM
  31.  
  32.  
  33. In article <CJ7nLJ.DL6@walter.bellcore.com>, 
  34. Darren New  <dnew@thumper.bellcore.com> wrote:
  35. >You can delete, unfortunately, easy low-level nonportable access to OS 
  36. >features.  It's non-trivial to use sockets, for example, from inside 
  37. >Icon, I've found. 
  38.  
  39. Yes, and it's a disappointment.  I had the idea of trying
  40.  socket := open("telnet myhost 119", "bp")
  41. on a Unix host to see if I could write network clients that way, but I 
  42. haven't actually gotten around to it yet.  If anyone gets something 
  43. similar to work, I would enjoy hearing about it.
  44.  
  45. To write servers, the best alternative may be to write a C program 
  46. that uses accept(2) and then forks an Icon program once a connection 
  47. is established.
  48.  
  49. Norman
  50.  
  51.  
  52.